import React from 'react'
import { Toast, NavBar } from 'react-vant';
import { Tabs } from 'antd';
import type { TabsProps } from 'antd';
import tu from '../../img/1.png'
import { useNavigate } from 'react-router-dom';

function Index() {
  const nav = useNavigate()
  const onChange = (key: string) => {
    console.log(key);
  };
  const items: TabsProps['items'] = [
    {
      key: '1',
      label: '全部订单',
      children: [
        <img style={{ width: '100vw', height: '700px' }} src={tu} alt="" />
      ],
    },
    {
      key: '2',
      label: '待付款',
      children: '待付款',
    },
    {
      key: '3',
      label: '待发货',
      children: '待发货',
    },
    {
      key: '4',
      label: '待收货',
      children: '待收货',
    },
  ];
  return (
    <div>
      <NavBar
        title="我的订单"
        leftText=""
        rightText="..."
        onClickLeft={() => nav('/')}
        onClickRight={() => Toast('按钮')}
      />

      <div>
        <Tabs defaultActiveKey="1" items={items} onChange={onChange} />
      </div>
    </div>
  )
}

export default Index
